﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Admin_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript" src="../js/jquery-1.6.min.js"></script>
    <link rel="stylesheet" type="text/css" href="themes/default/easyui.css" />
    <link rel="stylesheet" type="text/css" href="themes/icon.css" />
    <script type="text/javascript" src="js/jquery.easyui.min.js"></script>
    <script type="text/javascript">
        var curTabTitle = "";

        //{title:"",id:"",url:""}
        function OpenTab(opt) {
            if ($("#Pages").tabs("exists", opt.title)) {
                $("#Pages").tabs("select", opt.title);

            } else {
                $("#Pages").tabs('add', {
                    id: opt.id,
                    title: opt.title,
                    content: "<iframe scrolling=\"yes\" frameborder=\"0\"  src=\"" + opt.url + "\" style=\"width:100%;height:100%;\"></iframe>",
                    closable: true
                });
            }
        }

        //关闭指定ID的tab
        function CloseTab(tabTitle) {
            $("#Pages").tabs('close', tabTitle);
        }

        function reload() {
            var src = $("#Pages").tabs("getSelected").find("iframe").attr("src");
            $("#Pages").tabs("getSelected").find("iframe").attr("src", src);
        }

        function removeTab() {
            if (curTabTitle != "系统说明")
                $("#Pages").tabs("close", curTabTitle);
        }

        $(function () {
            $("#Pages").tabs({
                idSeed: 1,
                fit: true,
                onSelect: function (title) { curTabTitle = title; }
            });

            $("#menu").tree({
                url: "js/menu.js",
                onClick: function (node) {
                    if ($("#Pages").tabs("exists", node.text)) {
                        $("#Pages").tabs("select", node.text)
                    } else {
                        if (node.attributes != null) {
                            $("#Pages").tabs("add", {
                                id: node.id,
                                title: node.text,
                                content: "<iframe scrolling=\"yes\" frameborder=\"0\"  src=\"" + node.attributes.url + "\" style=\"width:100%;height:100%;\"></iframe>",
                                closable: true
                            });
                        }
                    }
                }
            });

            $("#btn_Add").click(function () {
                $('#win').window({
                    title: 'New Title',
                    width: 600,
                    modal: true,
                    shadow: true,
                    closed: false,
                    height: 300,
                    maximizable: true,
                    collapsible: false,
                    minimizable: false
                });
            });

            $("#btn_Save").click(function () {
                $.messager.confirm('My Title', 'Are you confirm this?',
        function (r) {
            if (r) {
                alert('confirmed:' + r);
            }
        });
            });
        });
    </script>
</head>
<body class="easyui-layout">
    <!--头部-->
    <div region="north" border="false" style="overflow: hidden; height: 60px; background: #A4BED4;">
        <h2 style="line-height: 60px; font-size: 20px; padding-left: 20px; margin: 0px;">
           *****后台管理</h2>
    </div>
    <!--底部-->
    <div region="south" split="false" style="height: 30px; background: #efefef;">
        技术支持：*********<a href="logout.aspx" class="easyui-linkbutton"
            plain="true" icon="icon-cancel">安全退出</a></div>
    <!--右边-->
    <!--div region="east" icon="icon-help" title="快捷面板" split="true" style="width:180px;"></div-->
    <!--左边-->
    <div region="west" split="true" title="功能菜单" style="width: 200px;">
        <ul id="menu">
        </ul>
    </div>
    <!--中间-->
    <div region="center" title="" style="background: #eee;">
        <div class="easyui-layout" fit="true" style="background: #ccc;">
            <!--功能按钮-->
            <div region="north" title="数据操作" style="height: 60px; background: #EFEFEF; padding: 2px">
                <a href="javascript:removeTab()" class="easyui-linkbutton" plain="true" icon="icon-remove">
                    关闭当前标签</a> <a href="javascript:reload()" class="easyui-linkbutton" plain="true" icon="icon-reload">
                        刷新当前标签</a>
            </div>
            <!--页面区域-->
            <div region="center" split="true">
                <div fit="true" border="false" id="Pages">
                    <div title="系统说明" style="padding: 20px; display: block;">
                        **************
                    </div>
                </div>
            </div>
        </div>
    </div>
    <form id="form1" runat="server">
    </form>
</body>
</html>
